package networking.messages.syncMessages;

import com.jme.math.Vector3f;

import networking.messages.ProximityMessage;
import networking.messages.playerMessages.PlayerMessage;

public class CMUseMessage extends PlayerMessage implements ProximityMessage {
	
	private Vector3f loc;
	
	public CMUseMessage() {
		super();
	}
	
	public CMUseMessage(int playerID) {
		this(playerID, null);
	}
	
	public CMUseMessage(int playerID, Vector3f loc) {
		super(playerID);
		this.loc = loc;
	}
	
	@Override
	public boolean applies() { return loc != null; }
	
	@Override
	public Vector3f getLocation() {
		return loc;
	}
}